﻿using CommunityToolkit.Mvvm.ComponentModel;
using Kang.DbDoc.Enums;

namespace Kang.DbDoc.Models
{
    public class RoutineModel : ObservableObject
    {
        private bool? _isCheck;
        /// <summary>
        /// 表名
        /// </summary>
        public bool? IsCheck
        {
            get
            {
                return _isCheck;
            }
            set
            {
                SetProperty(ref _isCheck, value);
            }
        }

        private string _name;
        /// <summary>
        /// 方法/存储过程名称
        /// </summary>
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                SetProperty(ref _name, value);
            }
        }

        private RoutineTypeEnum _type;
        /// <summary>
        /// 方法Or存储过程
        /// </summary>
        public RoutineTypeEnum Type
        {
            get
            {
                return _type;
            }
            set
            {
                SetProperty(ref _type, value);
            }
        }

        private string _comment;
        /// <summary>
        /// 方法/存储过程注解
        /// </summary>
        public string Comment
        {
            get
            {
                return _comment;
            }
            set
            {
                SetProperty(ref _comment, value);
            }
        }

        private string _dataType;
        /// <summary>
        /// 方法/存储过程返回参数类型
        /// </summary>
        public string DataType
        {
            get
            {
                return _dataType;
            }
            set
            {
                SetProperty(ref _dataType, value);
            }
        }

        private string _definition;
        /// <summary>
        /// 方法/存储过程内容
        /// </summary>
        public string Definition
        {
            get
            {
                return _definition;
            }
            set
            {
                SetProperty(ref _definition, value);
            }
        }

        private string _definer;
        /// <summary>
        /// 方法/存储过程定义者
        /// </summary>
        public string Definer
        {
            get
            {
                return _definer;
            }
            set
            {
                SetProperty(ref _definer, value);
            }
        }
    }
}
